/*
 * $Id$
 */
package corejs.expr;


import corejs.rt.Array;
import corejs.rt.Bool;
import corejs.rt.Function;
import corejs.rt.Long;
import corejs.rt.Null;
import corejs.rt.Number;
import corejs.rt.Str;
import corejs.rt.Undefined;
import corejs.rt.Value;

import corejs.stmt.Block;
import java.math.BigDecimal;
import java.util.List;

/**
 *
 * @author myang
 */
public interface ExpressionVisitor {

   Value visitAddition(Expression left, Expression right);

   Bool visitAnd(Expression left, Expression right);

   Array visitArray(ArrayExpr arrayExpr);

   Value visitAssignment(RefinementExpr left, Expression right);

   Value visitAssignment(String name, Expression e);

   Value visitRefinement(Expression target, Expression right);

   Function visitFunction(String name, String[] args, Block body);

   Number visitInteger(int i);

   Long visitLong(long l);

   corejs.rt.Decimal visitDecimal(BigDecimal d);

   Value visitInvocation(Expression e, List<Expression> args);

   Value visitMultiplication(Expression left, Expression right);

   Value visitName(NameExpr e);

   Value visitObject(ObjectExpr e);

   Bool visitOr(Expression left, Expression right);

   Bool visitNot(Expression e);

   Value visitSequence(SequenceExpr seq);

   Str visitString(String s);

   Value visitSubtraction(Expression left, Expression right);

   Str visitTypeof(Expression e);

   Undefined visitUndefined();

   Bool visitBool(boolean b);

   Bool visitLessThan(Expression left, Expression right);

   Bool visitGreaterThan(Expression left, Expression right);

   Bool visitLessEqualThan(Expression left, Expression right);

   Bool visitGreaterEqualThan(Expression left, Expression right);

   Bool visitEquals(Expression left, Expression right);

   Bool visitStrictEquals(Expression left, Expression right);

   Bool visitNotEquals(Expression left, Expression right);

   Bool visitStrictNotEquals(Expression left, Expression right);

   Null visitNull();

   Number visitSignedExpr(boolean neg, Expression expr);

   Value visitIncrement(boolean prefix, Expression expr);

   Value visitDecrement(boolean prefix, Expression expr);

   Value visitConditionExpr(Expression test, Expression then, Expression els);
}
